<template>
    <div class="boxs">
         <el-form :inline="true" :model="formInline" class="demo-form-inline">
            <el-form-item label="用户名称：">
                <el-input v-model="formInline.user" placeholder="请输入用户名称"></el-input>
            </el-form-item>
            <el-form-item>
            <el-button type="primary" @click="onSubmit">查询</el-button>
            </el-form-item>
        </el-form>
    </div>
</template>
<script>
import { ref, reactive, toRefs, onBeforeMount,getCurrentInstance,nextTick } from "vue";
import { userList } from '@/apis/modules/user.js'
export default {
    setup(){
        const state = reactive({
            formInline:{
                user:''
            }
        })
        const onSubmit = () =>{

        }
        onBeforeMount(()=>{
            initList()
        })
        const initList = async() =>{
            let res =  await userList({
                user:'555'
            })
            console.log(res)
        }
        return{
            ...toRefs(state),
            initList,
            onSubmit
        }
    }
}
</script>
<style lang="scss" scoped>

</style>